<?php

use Phinx\Migration\AbstractMigration;

class AddBalanceColumnUserTable extends AbstractMigration
{
    public function up()
    {
        $this->table("tenant")->addColumn("balance", 'decimal', [
            'default' => "0.00",
            'null' => false,
            'signed' => false,
            'precision' => 19,
            'scale' => 2,
            'comment' => "余额",
        ])->save();
    }

    public function down()
    {
        $this->table("tenant")->removeColumn("balance")->save();

    }
}
